<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-4"></span><span class="hs-comment">--</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- (c) The University of Glasgow 1994-2004</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.CmmToAsm.PPC.Regs</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-10"></span><span>        </span><span class="hs-comment">-- squeeze functions</span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#virtualRegSqueeze"><span class="hs-identifier">virtualRegSqueeze</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#realRegSqueeze"><span class="hs-identifier">realRegSqueeze</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#mkVirtualReg"><span class="hs-identifier">mkVirtualReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#regDotColor"><span class="hs-identifier">regDotColor</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span>        </span><span class="hs-comment">-- immediates</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier">Imm</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#strImmLit"><span class="hs-identifier">strImmLit</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#litToImm"><span class="hs-identifier">litToImm</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span>        </span><span class="hs-comment">-- addressing modes</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#AddrMode"><span class="hs-identifier">AddrMode</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#addrOffset"><span class="hs-identifier">addrOffset</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span>        </span><span class="hs-comment">-- registers</span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#spRel"><span class="hs-identifier">spRel</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier">argRegs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#allArgRegs"><span class="hs-identifier">allArgRegs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#callClobberedRegs"><span class="hs-identifier">callClobberedRegs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#allMachRegNos"><span class="hs-identifier">allMachRegNos</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#classOfRealReg"><span class="hs-identifier">classOfRealReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#showReg"><span class="hs-identifier">showReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#toRegNo"><span class="hs-identifier">toRegNo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span>        </span><span class="hs-comment">-- machine specific</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#allFPArgRegs"><span class="hs-identifier">allFPArgRegs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#fits16Bits"><span class="hs-identifier">fits16Bits</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#makeImmediate"><span class="hs-identifier">makeImmediate</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#fReg"><span class="hs-identifier">fReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r0"><span class="hs-identifier">r0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#sp"><span class="hs-identifier">sp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#toc"><span class="hs-identifier">toc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r3"><span class="hs-identifier">r3</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r4"><span class="hs-identifier">r4</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r11"><span class="hs-identifier">r11</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r12"><span class="hs-identifier">r12</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r30"><span class="hs-identifier">r30</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#tmpReg"><span class="hs-identifier">tmpReg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#f1"><span class="hs-identifier">f1</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#allocatableRegs"><span class="hs-identifier">allocatableRegs</span></a></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html"><span class="hs-identifier">GHC.Platform.Reg</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html"><span class="hs-identifier">GHC.Platform.Reg.Class</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Format.html"><span class="hs-identifier">GHC.CmmToAsm.Format</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.html"><span class="hs-identifier">GHC.Cmm</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html"><span class="hs-identifier">GHC.Cmm.CLabel</span></a></span><span>           </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier">CLabel</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Regs.html"><span class="hs-identifier">GHC.Platform.Regs</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier">Word8</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier">Word16</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier">Word32</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier">Word64</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Int.html#"><span class="hs-identifier">Data.Int</span></a></span><span>         </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int8"><span class="hs-identifier">Int8</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int16"><span class="hs-identifier">Int16</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int32"><span class="hs-identifier">Int32</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier">Int64</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="hs-comment">-- squeese functions for the graph allocator -----------------------------------</span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="hs-comment">-- | regSqueeze_class reg</span><span>
</span><span id="line-74"></span><span class="hs-comment">--      Calculate the maximum number of register colors that could be</span><span>
</span><span id="line-75"></span><span class="hs-comment">--      denied to a node of this class due to having this reg</span><span>
</span><span id="line-76"></span><span class="hs-comment">--      as a neighbour.</span><span>
</span><span id="line-77"></span><span class="hs-comment">--</span><span>
</span><span id="line-78"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#virtualRegSqueeze"><span class="hs-pragma hs-type">virtualRegSqueeze</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-79"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#virtualRegSqueeze"><span class="hs-identifier hs-type">virtualRegSqueeze</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-80"></span><span id="virtualRegSqueeze"><span class="annot"><span class="annottext">virtualRegSqueeze :: RegClass -&gt; VirtualReg -&gt; Int
</span><a href="GHC.CmmToAsm.PPC.Regs.html#virtualRegSqueeze"><span class="hs-identifier hs-var hs-var">virtualRegSqueeze</span></a></span></span><span> </span><span id="local-6989586621681008571"><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681008571"><span class="hs-identifier hs-var">cls</span></a></span></span><span> </span><span id="local-6989586621681008570"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681008570"><span class="hs-identifier hs-var">vr</span></a></span></span><span>
</span><span id="line-81"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681008571"><span class="hs-identifier hs-var">cls</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-82"></span><span>        </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span><span>
</span><span id="line-83"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681008570"><span class="hs-identifier hs-var">vr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-84"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-type">VirtualRegI</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-85"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegHi"><span class="hs-identifier hs-type">VirtualRegHi</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-86"></span><span>                </span><span id="local-6989586621681008566"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681008566"><span class="hs-identifier hs-var">_other</span></a></span></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span>        </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcDouble"><span class="hs-identifier hs-var">RcDouble</span></a></span><span>
</span><span id="line-89"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681008570"><span class="hs-identifier hs-var">vr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-90"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-type">VirtualRegD</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-91"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualRegF"><span class="hs-identifier hs-type">VirtualRegF</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-92"></span><span>                </span><span id="local-6989586621681008562"><span class="annot"><span class="annottext">VirtualReg
</span><a href="#local-6989586621681008562"><span class="hs-identifier hs-var">_other</span></a></span></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span>        </span><span id="local-6989586621681008561"><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681008561"><span class="hs-identifier hs-var">_other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#realRegSqueeze"><span class="hs-pragma hs-type">realRegSqueeze</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-97"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#realRegSqueeze"><span class="hs-identifier hs-type">realRegSqueeze</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-98"></span><span id="realRegSqueeze"><span class="annot"><span class="annottext">realRegSqueeze :: RegClass -&gt; RealReg -&gt; Int
</span><a href="GHC.CmmToAsm.PPC.Regs.html#realRegSqueeze"><span class="hs-identifier hs-var hs-var">realRegSqueeze</span></a></span></span><span> </span><span id="local-6989586621681008560"><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681008560"><span class="hs-identifier hs-var">cls</span></a></span></span><span> </span><span id="local-6989586621681008559"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681008559"><span class="hs-identifier hs-var">rr</span></a></span></span><span>
</span><span id="line-99"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681008560"><span class="hs-identifier hs-var">cls</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-100"></span><span>        </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span><span>
</span><span id="line-101"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681008559"><span class="hs-identifier hs-var">rr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-102"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-type">RealRegSingle</span></a></span><span> </span><span id="local-6989586621681008557"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008557"><span class="hs-identifier hs-var">regNo</span></a></span></span><span>
</span><span id="line-103"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008557"><span class="hs-identifier hs-var">regNo</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>     </span><span class="hs-comment">-- first fp reg is 32</span><span>
</span><span id="line-104"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-105"></span><span>
</span><span id="line-106"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegPair"><span class="hs-identifier hs-type">RealRegPair</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span>        </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcDouble"><span class="hs-identifier hs-var">RcDouble</span></a></span><span>
</span><span id="line-109"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681008559"><span class="hs-identifier hs-var">rr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-110"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-type">RealRegSingle</span></a></span><span> </span><span id="local-6989586621681008554"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008554"><span class="hs-identifier hs-var">regNo</span></a></span></span><span>
</span><span id="line-111"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008554"><span class="hs-identifier hs-var">regNo</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-112"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span>                </span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegPair"><span class="hs-identifier hs-type">RealRegPair</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span>        </span><span id="local-6989586621681008553"><span class="annot"><span class="annottext">RegClass
</span><a href="#local-6989586621681008553"><span class="hs-identifier hs-var">_other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#mkVirtualReg"><span class="hs-identifier hs-type">mkVirtualReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Format.html#Format"><span class="hs-identifier hs-type">Format</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#VirtualReg"><span class="hs-identifier hs-type">VirtualReg</span></a></span><span>
</span><span id="line-119"></span><span id="mkVirtualReg"><span class="annot"><span class="annottext">mkVirtualReg :: Unique -&gt; Format -&gt; VirtualReg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#mkVirtualReg"><span class="hs-identifier hs-var hs-var">mkVirtualReg</span></a></span></span><span> </span><span id="local-6989586621681008552"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681008552"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621681008551"><span class="annot"><span class="annottext">Format
</span><a href="#local-6989586621681008551"><span class="hs-identifier hs-var">format</span></a></span></span><span>
</span><span id="line-120"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Format -&gt; Bool
</span><a href="GHC.CmmToAsm.Format.html#isFloatFormat"><span class="hs-identifier hs-var">isFloatFormat</span></a></span><span> </span><span class="annot"><span class="annottext">Format
</span><a href="#local-6989586621681008551"><span class="hs-identifier hs-var">format</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; VirtualReg
</span><a href="GHC.Platform.Reg.html#VirtualRegI"><span class="hs-identifier hs-var">VirtualRegI</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681008552"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-121"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-122"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Format
</span><a href="#local-6989586621681008551"><span class="hs-identifier hs-var">format</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-123"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#FF32"><span class="hs-identifier hs-var">FF32</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; VirtualReg
</span><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-var">VirtualRegD</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681008552"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-124"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><a href="GHC.CmmToAsm.Format.html#FF64"><span class="hs-identifier hs-var">FF64</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; VirtualReg
</span><a href="GHC.Platform.Reg.html#VirtualRegD"><span class="hs-identifier hs-var">VirtualRegD</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681008552"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-125"></span><span>        </span><span class="annot"><span class="annottext">Format
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; VirtualReg
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mkVirtualReg&quot;</span></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#regDotColor"><span class="hs-identifier hs-type">regDotColor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-128"></span><span id="regDotColor"><span class="annot"><span class="annottext">regDotColor :: RealReg -&gt; SDoc
</span><a href="GHC.CmmToAsm.PPC.Regs.html#regDotColor"><span class="hs-identifier hs-var hs-var">regDotColor</span></a></span></span><span> </span><span id="local-6989586621681008545"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681008545"><span class="hs-identifier hs-var">reg</span></a></span></span><span>
</span><span id="line-129"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RealReg -&gt; RegClass
</span><a href="GHC.CmmToAsm.PPC.Regs.html#classOfRealReg"><span class="hs-identifier hs-var">classOfRealReg</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681008545"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-130"></span><span>        </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;blue&quot;</span></span><span>
</span><span id="line-131"></span><span>        </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcFloat"><span class="hs-identifier hs-var">RcFloat</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;red&quot;</span></span><span>
</span><span id="line-132"></span><span>        </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcDouble"><span class="hs-identifier hs-var">RcDouble</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;green&quot;</span></span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span class="hs-comment">-- immediates ------------------------------------------------------------------</span><span>
</span><span id="line-137"></span><span class="hs-keyword">data</span><span> </span><span id="Imm"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-var">Imm</span></a></span></span><span>
</span><span id="line-138"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="ImmInt"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span></span><span>        </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-139"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="ImmInteger"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#ImmInteger"><span class="hs-identifier hs-var">ImmInteger</span></a></span></span><span>    </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span>     </span><span class="hs-comment">-- Sigh.</span><span>
</span><span id="line-140"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="ImmCLbl"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#ImmCLbl"><span class="hs-identifier hs-var">ImmCLbl</span></a></span></span><span>       </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>      </span><span class="hs-comment">-- AbstractC Label (with baggage)</span><span>
</span><span id="line-141"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="ImmLit"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#ImmLit"><span class="hs-identifier hs-var">ImmLit</span></a></span></span><span>        </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>        </span><span class="hs-comment">-- Simple string</span><span>
</span><span id="line-142"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="ImmIndex"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#ImmIndex"><span class="hs-identifier hs-var">ImmIndex</span></a></span></span><span>    </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-143"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="ImmFloat"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#ImmFloat"><span class="hs-identifier hs-var">ImmFloat</span></a></span></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Real.html#Rational"><span class="hs-identifier hs-type">Rational</span></a></span><span>
</span><span id="line-144"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="ImmDouble"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#ImmDouble"><span class="hs-identifier hs-var">ImmDouble</span></a></span></span><span>     </span><span class="annot"><a href="../../base/src/GHC.Real.html#Rational"><span class="hs-identifier hs-type">Rational</span></a></span><span>
</span><span id="line-145"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="ImmConstantSum"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#ImmConstantSum"><span class="hs-identifier hs-var">ImmConstantSum</span></a></span></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-146"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="ImmConstantDiff"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#ImmConstantDiff"><span class="hs-identifier hs-var">ImmConstantDiff</span></a></span></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-147"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="LO"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#LO"><span class="hs-identifier hs-var">LO</span></a></span></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-148"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="HI"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#HI"><span class="hs-identifier hs-var">HI</span></a></span></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-149"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="HA"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#HA"><span class="hs-identifier hs-var">HA</span></a></span></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>        </span><span class="hs-comment">{- high halfword adjusted -}</span><span>
</span><span id="line-150"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="HIGHERA"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#HIGHERA"><span class="hs-identifier hs-var">HIGHERA</span></a></span></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-151"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="HIGHESTA"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#HIGHESTA"><span class="hs-identifier hs-var">HIGHESTA</span></a></span></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#strImmLit"><span class="hs-identifier hs-type">strImmLit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-155"></span><span id="strImmLit"><span class="annot"><span class="annottext">strImmLit :: String -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#strImmLit"><span class="hs-identifier hs-var hs-var">strImmLit</span></a></span></span><span> </span><span id="local-6989586621681008528"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681008528"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmLit"><span class="hs-identifier hs-var">ImmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681008528"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#litToImm"><span class="hs-identifier hs-type">litToImm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-159"></span><span id="litToImm"><span class="annot"><span class="annottext">litToImm :: CmmLit -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#litToImm"><span class="hs-identifier hs-var hs-var">litToImm</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681008526"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681008526"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681008525"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681008525"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmInteger"><span class="hs-identifier hs-var">ImmInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681008525"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681008526"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-160"></span><span>                </span><span class="hs-comment">-- narrow to the width: a CmmInt might be out of</span><span>
</span><span id="line-161"></span><span>                </span><span class="hs-comment">-- range, but we assume that ImmInteger only contains</span><span>
</span><span id="line-162"></span><span>                </span><span class="hs-comment">-- in-range values.  A signed value should be fine here.</span><span>
</span><span id="line-163"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmFloat"><span class="hs-identifier hs-type">CmmFloat</span></a></span><span> </span><span id="local-6989586621681008522"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681008522"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W32"><span class="hs-identifier hs-var">W32</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmFloat"><span class="hs-identifier hs-var">ImmFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681008522"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-164"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmFloat"><span class="hs-identifier hs-type">CmmFloat</span></a></span><span> </span><span id="local-6989586621681008520"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681008520"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W64"><span class="hs-identifier hs-var">W64</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmDouble"><span class="hs-identifier hs-var">ImmDouble</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681008520"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-165"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLabel"><span class="hs-identifier hs-type">CmmLabel</span></a></span><span> </span><span id="local-6989586621681008517"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681008517"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmCLbl"><span class="hs-identifier hs-var">ImmCLbl</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681008517"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-166"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLabelOff"><span class="hs-identifier hs-type">CmmLabelOff</span></a></span><span> </span><span id="local-6989586621681008515"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681008515"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621681008514"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008514"><span class="hs-identifier hs-var">off</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmIndex"><span class="hs-identifier hs-var">ImmIndex</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681008515"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008514"><span class="hs-identifier hs-var">off</span></a></span><span>
</span><span id="line-167"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLabelDiffOff"><span class="hs-identifier hs-type">CmmLabelDiffOff</span></a></span><span> </span><span id="local-6989586621681008512"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681008512"><span class="hs-identifier hs-var">l1</span></a></span></span><span> </span><span id="local-6989586621681008511"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681008511"><span class="hs-identifier hs-var">l2</span></a></span></span><span> </span><span id="local-6989586621681008510"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008510"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>                             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Imm -&gt; Imm -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmConstantSum"><span class="hs-identifier hs-var">ImmConstantSum</span></a></span><span>
</span><span id="line-169"></span><span>                               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Imm -&gt; Imm -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmConstantDiff"><span class="hs-identifier hs-var">ImmConstantDiff</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmCLbl"><span class="hs-identifier hs-var">ImmCLbl</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681008512"><span class="hs-identifier hs-var">l1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmCLbl"><span class="hs-identifier hs-var">ImmCLbl</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681008511"><span class="hs-identifier hs-var">l2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-170"></span><span>                               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008510"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#litToImm"><span class="hs-identifier hs-var">litToImm</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit
</span><span class="hs-identifier">_</span></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Imm
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PPC.Regs.litToImm: no match&quot;</span></span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span class="hs-comment">-- addressing modes ------------------------------------------------------------</span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span class="hs-keyword">data</span><span> </span><span id="AddrMode"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#AddrMode"><span class="hs-identifier hs-var">AddrMode</span></a></span></span><span>
</span><span id="line-177"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="AddrRegReg"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#AddrRegReg"><span class="hs-identifier hs-var">AddrRegReg</span></a></span></span><span>    </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-178"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="AddrRegImm"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#AddrRegImm"><span class="hs-identifier hs-var">AddrRegImm</span></a></span></span><span>    </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span>
</span><span id="line-181"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#addrOffset"><span class="hs-identifier hs-type">addrOffset</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#AddrMode"><span class="hs-identifier hs-type">AddrMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#AddrMode"><span class="hs-identifier hs-type">AddrMode</span></a></span><span>
</span><span id="line-182"></span><span id="addrOffset"><span class="annot"><span class="annottext">addrOffset :: AddrMode -&gt; Int -&gt; Maybe AddrMode
</span><a href="GHC.CmmToAsm.PPC.Regs.html#addrOffset"><span class="hs-identifier hs-var hs-var">addrOffset</span></a></span></span><span> </span><span id="local-6989586621681008507"><span class="annot"><span class="annottext">AddrMode
</span><a href="#local-6989586621681008507"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621681008506"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008506"><span class="hs-identifier hs-var">off</span></a></span></span><span>
</span><span id="line-183"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">AddrMode
</span><a href="#local-6989586621681008507"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-184"></span><span>      </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#AddrRegImm"><span class="hs-identifier hs-type">AddrRegImm</span></a></span><span> </span><span id="local-6989586621681008505"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681008505"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#ImmInt"><span class="hs-identifier hs-type">ImmInt</span></a></span><span> </span><span id="local-6989586621681008504"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008504"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-185"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool
forall a. Integral a =&gt; a -&gt; Bool
</span><a href="GHC.CmmToAsm.PPC.Regs.html#fits16Bits"><span class="hs-identifier hs-var">fits16Bits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008503"><span class="hs-identifier hs-var">n2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">AddrMode -&gt; Maybe AddrMode
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Reg -&gt; Imm -&gt; AddrMode
</span><a href="GHC.CmmToAsm.PPC.Regs.html#AddrRegImm"><span class="hs-identifier hs-var">AddrRegImm</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681008505"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008503"><span class="hs-identifier hs-var">n2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe AddrMode
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-187"></span><span>       </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681008503"><span class="annot"><span class="annottext">n2 :: Int
</span><a href="#local-6989586621681008503"><span class="hs-identifier hs-var hs-var">n2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008504"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008506"><span class="hs-identifier hs-var">off</span></a></span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span>      </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#AddrRegImm"><span class="hs-identifier hs-type">AddrRegImm</span></a></span><span> </span><span id="local-6989586621681008500"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681008500"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#ImmInteger"><span class="hs-identifier hs-type">ImmInteger</span></a></span><span> </span><span id="local-6989586621681008499"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681008499"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-190"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Bool
forall a. Integral a =&gt; a -&gt; Bool
</span><a href="GHC.CmmToAsm.PPC.Regs.html#fits16Bits"><span class="hs-identifier hs-var">fits16Bits</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681008498"><span class="hs-identifier hs-var">n2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">AddrMode -&gt; Maybe AddrMode
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Reg -&gt; Imm -&gt; AddrMode
</span><a href="GHC.CmmToAsm.PPC.Regs.html#AddrRegImm"><span class="hs-identifier hs-var">AddrRegImm</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681008500"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681008498"><span class="hs-identifier hs-var">n2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-191"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe AddrMode
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-192"></span><span>       </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681008498"><span class="annot"><span class="annottext">n2 :: Integer
</span><a href="#local-6989586621681008498"><span class="hs-identifier hs-var hs-var">n2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681008499"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="../../base/src/GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008506"><span class="hs-identifier hs-var">off</span></a></span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span>      </span><span class="annot"><span class="annottext">AddrMode
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe AddrMode
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="hs-comment">-- registers -------------------------------------------------------------------</span><span>
</span><span id="line-198"></span><span class="hs-comment">-- @spRel@ gives us a stack relative addressing mode for volatile</span><span>
</span><span id="line-199"></span><span class="hs-comment">-- temporaries and for excess call arguments.  @fpRel@, where</span><span>
</span><span id="line-200"></span><span class="hs-comment">-- applicable, is the same but for the frame pointer.</span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#spRel"><span class="hs-identifier hs-type">spRel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-203"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>    </span><span class="hs-comment">-- desired stack offset in words, positive or negative</span><span>
</span><span id="line-204"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#AddrMode"><span class="hs-identifier hs-type">AddrMode</span></a></span><span>
</span><span id="line-205"></span><span>
</span><span id="line-206"></span><span id="spRel"><span class="annot"><span class="annottext">spRel :: Platform -&gt; Int -&gt; AddrMode
</span><a href="GHC.CmmToAsm.PPC.Regs.html#spRel"><span class="hs-identifier hs-var hs-var">spRel</span></a></span></span><span> </span><span id="local-6989586621681008494"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681008494"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681008493"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008493"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Imm -&gt; AddrMode
</span><a href="GHC.CmmToAsm.PPC.Regs.html#AddrRegImm"><span class="hs-identifier hs-var">AddrRegImm</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#sp"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008493"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681008494"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-207"></span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span class="hs-comment">-- argRegs is the set of regs which are read for an n-argument call to C.</span><span>
</span><span id="line-210"></span><span class="hs-comment">-- For archs which pass all args on the stack (x86), is empty.</span><span>
</span><span id="line-211"></span><span class="hs-comment">-- Sparc passes up to the first 6 args in regs.</span><span>
</span><span id="line-212"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier hs-type">argRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-213"></span><span id="argRegs"><span class="annot"><span class="annottext">argRegs :: Int -&gt; [Reg]
</span><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier hs-var hs-var">argRegs</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-214"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier hs-var">argRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">]</span><span>
</span><span id="line-215"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier hs-var">argRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="hs-special">]</span><span>
</span><span id="line-216"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier hs-var">argRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">5</span></span><span class="hs-special">]</span><span>
</span><span id="line-217"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier hs-var">argRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span class="hs-special">]</span><span>
</span><span id="line-218"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier hs-var">argRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">5</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span class="hs-special">]</span><span>
</span><span id="line-219"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier hs-var">argRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">]</span><span>
</span><span id="line-220"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier hs-var">argRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">9</span></span><span class="hs-special">]</span><span>
</span><span id="line-221"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier hs-var">argRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span class="hs-special">]</span><span>
</span><span id="line-222"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#argRegs"><span class="hs-identifier hs-var">argRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [Reg]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;MachRegs.argRegs(powerpc): don't know about &gt;8 arguments!&quot;</span></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#allArgRegs"><span class="hs-identifier hs-type">allArgRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-226"></span><span id="allArgRegs"><span class="annot"><span class="annottext">allArgRegs :: [Reg]
</span><a href="GHC.CmmToAsm.PPC.Regs.html#allArgRegs"><span class="hs-identifier hs-var hs-var">allArgRegs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span class="hs-special">]</span><span>
</span><span id="line-227"></span><span>
</span><span id="line-228"></span><span>
</span><span id="line-229"></span><span class="hs-comment">-- these are the regs which we cannot assume stay alive over a C call.</span><span>
</span><span id="line-230"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#callClobberedRegs"><span class="hs-identifier hs-type">callClobberedRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-231"></span><span id="callClobberedRegs"><span class="annot"><span class="annottext">callClobberedRegs :: Platform -&gt; [Reg]
</span><a href="GHC.CmmToAsm.PPC.Regs.html#callClobberedRegs"><span class="hs-identifier hs-var hs-var">callClobberedRegs</span></a></span></span><span> </span><span id="local-6989586621681008488"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681008488"><span class="hs-identifier hs-var">_platform</span></a></span></span><span>
</span><span id="line-232"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="annot"><span class="annottext">Int -&gt; [Int] -&gt; [Int]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">12</span></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; [Int] -&gt; [Int]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Int) -&gt; [Int] -&gt; [Int]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="GHC.CmmToAsm.PPC.Regs.html#fReg"><span class="hs-identifier hs-var">fReg</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">13</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span>
</span><span id="line-235"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#allMachRegNos"><span class="hs-identifier hs-type">allMachRegNos</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-236"></span><span id="allMachRegNos"><span class="annot"><span class="annottext">allMachRegNos :: [Int]
</span><a href="GHC.CmmToAsm.PPC.Regs.html#allMachRegNos"><span class="hs-identifier hs-var hs-var">allMachRegNos</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">63</span></span><span class="hs-special">]</span><span>
</span><span id="line-237"></span><span>
</span><span id="line-238"></span><span>
</span><span id="line-239"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#classOfRealReg"><span class="hs-pragma hs-type">classOfRealReg</span></a></span><span>      </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-240"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#classOfRealReg"><span class="hs-identifier hs-type">classOfRealReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span>
</span><span id="line-241"></span><span id="classOfRealReg"><span class="annot"><span class="annottext">classOfRealReg :: RealReg -&gt; RegClass
</span><a href="GHC.CmmToAsm.PPC.Regs.html#classOfRealReg"><span class="hs-identifier hs-var hs-var">classOfRealReg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-type">RealRegSingle</span></a></span><span> </span><span id="local-6989586621681008487"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008487"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-242"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008487"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span><span>
</span><span id="line-243"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcDouble"><span class="hs-identifier hs-var">RcDouble</span></a></span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#classOfRealReg"><span class="hs-identifier hs-var">classOfRealReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegPair"><span class="hs-identifier hs-type">RealRegPair</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-246"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; RegClass
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;regClass(ppr): no reg pairs on this architecture&quot;</span></span><span>
</span><span id="line-247"></span><span>
</span><span id="line-248"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#showReg"><span class="hs-identifier hs-type">showReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-249"></span><span id="showReg"><span class="annot"><span class="annottext">showReg :: Int -&gt; String
</span><a href="GHC.CmmToAsm.PPC.Regs.html#showReg"><span class="hs-identifier hs-var hs-var">showReg</span></a></span></span><span> </span><span id="local-6989586621681008486"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008486"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-250"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008486"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008486"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">31</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%r&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008486"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-251"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008486"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008486"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">63</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%f&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008486"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span class="hs-special">)</span><span>
</span><span id="line-252"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%unknown_powerpc_real_reg_&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008486"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-253"></span><span>
</span><span id="line-254"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#toRegNo"><span class="hs-identifier hs-type">toRegNo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span>
</span><span id="line-255"></span><span id="toRegNo"><span class="annot"><span class="annottext">toRegNo :: Reg -&gt; Int
</span><a href="GHC.CmmToAsm.PPC.Regs.html#toRegNo"><span class="hs-identifier hs-var hs-var">toRegNo</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#RegReal"><span class="hs-identifier hs-type">RegReal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-type">RealRegSingle</span></a></span><span> </span><span id="local-6989586621681008481"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008481"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008481"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-256"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#toRegNo"><span class="hs-identifier hs-var">toRegNo</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><span class="hs-identifier">_</span></span><span>                           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PPC.toRegNo: unsupported register&quot;</span></span><span>
</span><span id="line-257"></span><span>
</span><span id="line-258"></span><span class="hs-comment">-- machine specific ------------------------------------------------------------</span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#allFPArgRegs"><span class="hs-identifier hs-type">allFPArgRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-261"></span><span id="allFPArgRegs"><span class="annot"><span class="annottext">allFPArgRegs :: Platform -&gt; [Reg]
</span><a href="GHC.CmmToAsm.PPC.Regs.html#allFPArgRegs"><span class="hs-identifier hs-var hs-var">allFPArgRegs</span></a></span></span><span> </span><span id="local-6989586621681008480"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681008480"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-262"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681008480"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-263"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSAIX"><span class="hs-identifier hs-var">OSAIX</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; (Int -&gt; Int) -&gt; Int -&gt; Reg
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="GHC.CmmToAsm.PPC.Regs.html#fReg"><span class="hs-identifier hs-var">fReg</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">13</span></span><span class="hs-special">]</span><span>
</span><span id="line-264"></span><span>      </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformArch"><span class="hs-identifier hs-var">platformArch</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681008480"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-265"></span><span>        </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchPPC"><span class="hs-identifier hs-var">ArchPPC</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; (Int -&gt; Int) -&gt; Int -&gt; Reg
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="GHC.CmmToAsm.PPC.Regs.html#fReg"><span class="hs-identifier hs-var">fReg</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">]</span><span>
</span><span id="line-266"></span><span>        </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#ArchPPC_64"><span class="hs-identifier hs-type">ArchPPC_64</span></a></span><span> </span><span class="annot"><span class="annottext">PPC_64ABI
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; [Int] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; (Int -&gt; Int) -&gt; Int -&gt; Reg
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="GHC.CmmToAsm.PPC.Regs.html#fReg"><span class="hs-identifier hs-var">fReg</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-glyph">..</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">13</span></span><span class="hs-special">]</span><span>
</span><span id="line-267"></span><span>        </span><span class="annot"><span class="annottext">Arch
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; [Reg]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PPC.Regs.allFPArgRegs: unknown PPC Linux&quot;</span></span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span id="local-6989586621681008721"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#fits16Bits"><span class="hs-identifier hs-type">fits16Bits</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681008721"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681008721"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-270"></span><span id="fits16Bits"><span class="annot"><span class="annottext">fits16Bits :: forall a. Integral a =&gt; a -&gt; Bool
</span><a href="GHC.CmmToAsm.PPC.Regs.html#fits16Bits"><span class="hs-identifier hs-var hs-var">fits16Bits</span></a></span></span><span> </span><span id="local-6989586621681008461"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008461"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008461"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">32768</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008461"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">32768</span></span><span>
</span><span id="line-271"></span><span>
</span><span id="line-272"></span><span id="local-6989586621681008704"><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#makeImmediate"><span class="hs-identifier hs-type">makeImmediate</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681008704"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Type.html#Width"><span class="hs-identifier hs-type">Width</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681008704"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#Imm"><span class="hs-identifier hs-type">Imm</span></a></span></span><span>
</span><span id="line-273"></span><span id="makeImmediate"><span class="annot"><span class="annottext">makeImmediate :: forall a. Integral a =&gt; Width -&gt; Bool -&gt; a -&gt; Maybe Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#makeImmediate"><span class="hs-identifier hs-var hs-var">makeImmediate</span></a></span></span><span> </span><span id="local-6989586621681008457"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681008457"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span id="local-6989586621681008456"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681008456"><span class="hs-identifier hs-var">signed</span></a></span></span><span> </span><span id="local-6989586621681008455"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008455"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Imm) -&gt; Maybe Int -&gt; Maybe Imm
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Imm
</span><a href="GHC.CmmToAsm.PPC.Regs.html#ImmInt"><span class="hs-identifier hs-var">ImmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Bool -&gt; Maybe Int
</span><a href="#local-6989586621681008454"><span class="hs-identifier hs-var">toI16</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681008457"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681008456"><span class="hs-identifier hs-var">signed</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-274"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-275"></span><span>        </span><span id="local-6989586621681008404"><span class="annot"><span class="annottext">narrow :: Width -&gt; Bool -&gt; b
</span><a href="#local-6989586621681008404"><span class="hs-identifier hs-var hs-var">narrow</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W64"><span class="hs-identifier hs-var">W64</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; b
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Word64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-276"></span><span>        </span><span class="annot"><a href="#local-6989586621681008404"><span class="hs-identifier hs-var">narrow</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W32"><span class="hs-identifier hs-var">W32</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; b
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-277"></span><span>        </span><span class="annot"><a href="#local-6989586621681008404"><span class="hs-identifier hs-var">narrow</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W16"><span class="hs-identifier hs-var">W16</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; b
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Word16
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-278"></span><span>        </span><span class="annot"><a href="#local-6989586621681008404"><span class="hs-identifier hs-var">narrow</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W8"><span class="hs-identifier hs-var">W8</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; b
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-279"></span><span>        </span><span class="annot"><a href="#local-6989586621681008404"><span class="hs-identifier hs-var">narrow</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W64"><span class="hs-identifier hs-var">W64</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; b
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int64
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-280"></span><span>        </span><span class="annot"><a href="#local-6989586621681008404"><span class="hs-identifier hs-var">narrow</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W32"><span class="hs-identifier hs-var">W32</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int32 -&gt; b
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int32"><span class="hs-identifier hs-type">Int32</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-281"></span><span>        </span><span class="annot"><a href="#local-6989586621681008404"><span class="hs-identifier hs-var">narrow</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W16"><span class="hs-identifier hs-var">W16</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int16 -&gt; b
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int16
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int16"><span class="hs-identifier hs-type">Int16</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-282"></span><span>        </span><span class="annot"><a href="#local-6989586621681008404"><span class="hs-identifier hs-var">narrow</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W8"><span class="hs-identifier hs-var">W8</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int8 -&gt; b
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681008455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int8"><span class="hs-identifier hs-type">Int8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-283"></span><span>        </span><span class="annot"><a href="#local-6989586621681008404"><span class="hs-identifier hs-var">narrow</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span>   </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; b
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PPC.Regs.narrow: no match&quot;</span></span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span>        </span><span id="local-6989586621681008400"><span class="annot"><span class="annottext">narrowed :: Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var hs-var">narrowed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Bool -&gt; Int
forall {b}. Num b =&gt; Width -&gt; Bool -&gt; b
</span><a href="#local-6989586621681008404"><span class="hs-identifier hs-var">narrow</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681008457"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681008456"><span class="hs-identifier hs-var">signed</span></a></span><span>
</span><span id="line-286"></span><span>
</span><span id="line-287"></span><span>        </span><span id="local-6989586621681008454"><span class="annot"><span class="annottext">toI16 :: Width -&gt; Bool -&gt; Maybe Int
</span><a href="#local-6989586621681008454"><span class="hs-identifier hs-var hs-var">toI16</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W32"><span class="hs-identifier hs-var">W32</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-288"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32768</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32768</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span>
</span><span id="line-289"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-290"></span><span>        </span><span class="annot"><a href="#local-6989586621681008454"><span class="hs-identifier hs-var">toI16</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W32"><span class="hs-identifier hs-var">W32</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-291"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">65536</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span>
</span><span id="line-292"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-293"></span><span>        </span><span class="annot"><a href="#local-6989586621681008454"><span class="hs-identifier hs-var">toI16</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W64"><span class="hs-identifier hs-var">W64</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-294"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32768</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32768</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span>
</span><span id="line-295"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-296"></span><span>        </span><span class="annot"><a href="#local-6989586621681008454"><span class="hs-identifier hs-var">toI16</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="GHC.Cmm.Type.html#W64"><span class="hs-identifier hs-var">W64</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-297"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">65536</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span>
</span><span id="line-298"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-299"></span><span>        </span><span class="annot"><a href="#local-6989586621681008454"><span class="hs-identifier hs-var">toI16</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008400"><span class="hs-identifier hs-var">narrowed</span></a></span><span>
</span><span id="line-300"></span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span class="hs-comment">{-
The PowerPC has 64 registers of interest; 32 integer registers and 32 floating
point registers.
-}</span><span>
</span><span id="line-306"></span><span>
</span><span id="line-307"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#fReg"><span class="hs-identifier hs-type">fReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RegNo"><span class="hs-identifier hs-type">RegNo</span></a></span><span>
</span><span id="line-308"></span><span id="fReg"><span class="annot"><span class="annottext">fReg :: Int -&gt; Int
</span><a href="GHC.CmmToAsm.PPC.Regs.html#fReg"><span class="hs-identifier hs-var hs-var">fReg</span></a></span></span><span> </span><span id="local-6989586621681008381"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008381"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008381"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-309"></span><span>
</span><span id="line-310"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r0"><span class="hs-identifier hs-type">r0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#sp"><span class="hs-identifier hs-type">sp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#toc"><span class="hs-identifier hs-type">toc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r3"><span class="hs-identifier hs-type">r3</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r4"><span class="hs-identifier hs-type">r4</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r11"><span class="hs-identifier hs-type">r11</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r12"><span class="hs-identifier hs-type">r12</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#r30"><span class="hs-identifier hs-type">r30</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#f1"><span class="hs-identifier hs-type">f1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-311"></span><span id="r0"><span class="annot"><span class="annottext">r0 :: Reg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#r0"><span class="hs-identifier hs-var hs-var">r0</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-312"></span><span id="sp"><span class="annot"><span class="annottext">sp :: Reg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#sp"><span class="hs-identifier hs-var hs-var">sp</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-313"></span><span id="toc"><span class="annot"><span class="annottext">toc :: Reg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#toc"><span class="hs-identifier hs-var hs-var">toc</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-314"></span><span id="r3"><span class="annot"><span class="annottext">r3 :: Reg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#r3"><span class="hs-identifier hs-var hs-var">r3</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span>
</span><span id="line-315"></span><span id="r4"><span class="annot"><span class="annottext">r4 :: Reg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#r4"><span class="hs-identifier hs-var hs-var">r4</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span>
</span><span id="line-316"></span><span id="r11"><span class="annot"><span class="annottext">r11 :: Reg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#r11"><span class="hs-identifier hs-var hs-var">r11</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">11</span></span><span>
</span><span id="line-317"></span><span id="r12"><span class="annot"><span class="annottext">r12 :: Reg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#r12"><span class="hs-identifier hs-var hs-var">r12</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">12</span></span><span>
</span><span id="line-318"></span><span id="r30"><span class="annot"><span class="annottext">r30 :: Reg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#r30"><span class="hs-identifier hs-var hs-var">r30</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">30</span></span><span>
</span><span id="line-319"></span><span id="f1"><span class="annot"><span class="annottext">f1 :: Reg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#f1"><span class="hs-identifier hs-var hs-var">f1</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Reg) -&gt; Int -&gt; Reg
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="GHC.CmmToAsm.PPC.Regs.html#fReg"><span class="hs-identifier hs-var">fReg</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-320"></span><span>
</span><span id="line-321"></span><span class="hs-comment">-- allocatableRegs is allMachRegNos with the fixed-use regs removed.</span><span>
</span><span id="line-322"></span><span class="hs-comment">-- i.e., these are the regs for which we are prepared to allow the</span><span>
</span><span id="line-323"></span><span class="hs-comment">-- register allocator to attempt to map VRegs to.</span><span>
</span><span id="line-324"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#allocatableRegs"><span class="hs-identifier hs-type">allocatableRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-325"></span><span id="allocatableRegs"><span class="annot"><span class="annottext">allocatableRegs :: Platform -&gt; [RealReg]
</span><a href="GHC.CmmToAsm.PPC.Regs.html#allocatableRegs"><span class="hs-identifier hs-var hs-var">allocatableRegs</span></a></span></span><span> </span><span id="local-6989586621681008380"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681008380"><span class="hs-identifier hs-var">platform</span></a></span></span><span>
</span><span id="line-326"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681008379"><span class="annot"><span class="annottext">isFree :: Int -&gt; Bool
</span><a href="#local-6989586621681008379"><span class="hs-identifier hs-var hs-var">isFree</span></a></span></span><span> </span><span id="local-6989586621681008378"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008378"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; Bool
</span><a href="GHC.Platform.Regs.html#freeReg"><span class="hs-identifier hs-var">freeReg</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681008380"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681008378"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-327"></span><span>     </span><span class="hs-keyword">in</span><span>  </span><span class="annot"><span class="annottext">(Int -&gt; RealReg) -&gt; [Int] -&gt; [RealReg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; RealReg
</span><a href="GHC.Platform.Reg.html#RealRegSingle"><span class="hs-identifier hs-var">RealRegSingle</span></a></span><span> </span><span class="annot"><span class="annottext">([Int] -&gt; [RealReg]) -&gt; [Int] -&gt; [RealReg]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Bool) -&gt; [Int] -&gt; [Int]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool
</span><a href="#local-6989586621681008379"><span class="hs-identifier hs-var">isFree</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="GHC.CmmToAsm.PPC.Regs.html#allMachRegNos"><span class="hs-identifier hs-var">allMachRegNos</span></a></span><span>
</span><span id="line-328"></span><span>
</span><span id="line-329"></span><span class="hs-comment">-- temporary register for compiler use</span><span>
</span><span id="line-330"></span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html#tmpReg"><span class="hs-identifier hs-type">tmpReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-331"></span><span id="tmpReg"><span class="annot"><span class="annottext">tmpReg :: Platform -&gt; Reg
</span><a href="GHC.CmmToAsm.PPC.Regs.html#tmpReg"><span class="hs-identifier hs-var hs-var">tmpReg</span></a></span></span><span> </span><span id="local-6989586621681008376"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681008376"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-332"></span><span>       </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformArch"><span class="hs-identifier hs-var">platformArch</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681008376"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-333"></span><span>       </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchPPC"><span class="hs-identifier hs-var">ArchPPC</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">13</span></span><span>
</span><span id="line-334"></span><span>       </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#ArchPPC_64"><span class="hs-identifier hs-type">ArchPPC_64</span></a></span><span> </span><span class="annot"><span class="annottext">PPC_64ABI
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg
</span><a href="GHC.Platform.Reg.html#regSingle"><span class="hs-identifier hs-var">regSingle</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">30</span></span><span>
</span><span id="line-335"></span><span>       </span><span class="annot"><span class="annottext">Arch
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Reg
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PPC.Regs.tmpReg: unknown arch&quot;</span></span><span>
</span><span id="line-336"></span></pre></body></html>